<template>
	<!-- 日期选择 -->
	<view class="statusSelect">
		<!-- <uni-data-select
			v-model="selStatus"
			:localdata="statusList"
			@change="statusChange"
			:clear="false"
		></uni-data-select> -->
		<uni-datetime-picker
			:modelValue="modelValue"
			type="daterange"
			@change="dateChange"
			style="width: 400rpx"
		/>
		<!-- <u-input v-model="selDate" :type="type" border @click="selectDate" /> -->
		<!-- <u-field v-model="selDate" placeholder="请选择日期" labelWidth="0" disabled right-icon="arrow-right" @click="selectDate"></u-field> -->
	</view>
</template>

<script lang="ts" setup>
defineProps({
	modelValue: {
		type: Array,
		default: () => []
	}
});
const emit = defineEmits<{
	(e: "update:modelValue", selDate: string[]): void;
}>();

// const statusChange = (e: string) => {
// 	selStatus.value = e;
// 	emit("searchList");
// };

const dateChange = (e: string[]) => {
	console.log("调用1次");
	emit("update:modelValue", e);
};
</script>

<style scoped lang="scss">
.statusSelect {
	height: 100rpx;
	background-color: #fff;
	padding: 10rpx;
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1rpx solid #f4f4f4;

	:deep(.uni-select) {
		height: auto;
		width: 200rpx;
		margin-right: 20rpx;
	}
}
</style>
